package com.rxyb.authority.gateway.dto.user;

import com.rxyb.authority.constants.AuthorityConstants;
import com.rxyb.authority.gateway.dto.BaseReq;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 获取用户信息请求
 *
 * @author duyh
 * @date 2020/5/28
 */
@Data
public class UpdateUserReq extends BaseReq {

    /**
     * 自增ID
     */
    @NotNull
    @Max(value = 999999999, message = "id 不能大于999999999")
    private Integer id;

    /**
     * 真实姓名
     */
    @Size(max = 30, message = "userName 不超过30位")
    private String userName;

    /**
     * 邮箱
     */
    @Email
    @Size(max = 30, message = "userEmail 不超过30位")
    private String userEmail;

    /**
     * 联系方式
     */
    @Size(max = 30, message = "userMobile 不超过30位")
    private String userMobile;

    /**
     * 机构ID
     */
    @Size(max = 30, message = "orgId 不超过30位")
    private String orgId;

    /**
     * 状态：1有效-1无效
     */
    @Max(value = 99, message = "userState 不能大于99")
    private Integer userState = AuthorityConstants.EFFECTIVE;

    /**
     * 角色ID
     */
    @Size(max = 30, message = "roleId 不超过30位")
    private String roleId;

    /**
     * 微信标识
     */
    @Size(max = 30, message = "openId 不超过30位")
    private String openId;

    /**
     * 是否需要强制修改密码
     */
    @Max(value = 99, message = "needUpdate 不能大于99")
    private Integer needUpdate = AuthorityConstants.EFFECTIVE;

}
